<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <input id="search"/>
    </div>
    <ul id="box"></ul>
    
</body>
<script>
    search.oninput = function(){
        let  key = this.value;
        let script  = document.createElement("script");
        script.src = `https://suggest.taobao.com/sug?k=1&area=c2c&q=${key}&code=utf-8&ts=1684117886200&callback=cb`;
        document.body.appendChild(script);

    }


    function  cb(res){
        let result = res.result//集合
        console.log(result);

        box.innerHTML= "";
        let html  = "";
        result.forEach(item=>{
            let content  = item[0];
            html  += `<li>${content}</li>`
        })
        box.innerHTML = html;

    }

</script>
<script src="https://suggest.taobao.com/sug?k=1&area=c2c&q=衣服&code=utf-8&ts=1684117886200&callback=cb"></script>
</html>